import i18n from "@/locals";
import { ref, toRaw } from "vue-demi";
enum BtnType {
    CoinPairs = "/coin/",
    Address = "/address/",
    CleverMoney = "/entity/"
}
interface Btn {
    name: string;
    val: BtnType;
}

const btns = ref<Btn[]>([
    // { name: "币对", val: BtnType.CoinPairs },
    { name: i18n.global.t('message.JBookMark.a'), val: BtnType.CoinPairs },
    // { name: "地址", val: BtnType.Address },
    { name: i18n.global.t('message.JBookMark.b'), val: BtnType.Address },
    // { name: "聪明钱", val: BtnType.CleverMoney }
    { name: i18n.global.t('message.JBookMark.c'), val: BtnType.CleverMoney }
]);
const idx = ref(toRaw(btns.value[0]));
function onDown(item: Btn) {
    idx.value = item;
}
function onOpen(type: BtnType, body: string) {
    window.open(type.concat(body));
}

export { btns, idx, onDown, onOpen, BtnType };
